package com.chaos.system.service.client;

import com.chaos.framework.model.dto.result.data.DataResult;
import com.chaos.framework.starter.base.BaseController;
import com.chaos.system.api.dto.BaiduLocationDto;
import com.chaos.system.api.feign.BaiduFeign;
import com.chaos.system.service.baidu.BaiduLbService;
import io.swagger.v3.oas.annotations.Hidden;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Jacky.Cui
 * @since 2024-11-13
 */
@RestController
@RequiredArgsConstructor
@Slf4j
@Hidden
public class BaiduClient extends BaseController implements BaiduFeign {

    private final BaiduLbService baiduLbService;

    @Override
    public DataResult<BaiduLocationDto> location(String ip) {
        return dataResult(baiduLbService.location(ip));
    }
}

